home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6306 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.0 KB  |  64 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: chang.unx.sas.com!walker
  3. From: walker@chang.unx.sas.com (Doug Walker)
  4. Subject: Re: Feeling very confused with SAS/C, NDK 3.1, etc.
  5. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  6. Message-ID: <Dovn40.34H@unx.sas.com>
  7. Date: Tue, 26 Mar 1996 13:36:00 GMT
  8. X-Nntp-Posting-Host: chang.unx.sas.com
  9. References: <1777.6656T1015T1276@mistral.co.uk> <DotxBJ.HqE@unx.sas.com> <3224.6658T1353T50@mistral.co.uk>
  10. Organization: SAS Institute Inc.
  11.  
  12. In article <3224.6658T1353T50@mistral.co.uk>,
  13. Adam Atkinson <ghira@mistral.co.uk> wrote:
  14. >I expressed myself poorly. I should have said "is it worth replacing the
  15. >commodore-supplied files in SAS C 5.56 with later versions from NDK 3.1,
  16. >where these exist?" Actually, I haven't been able to find any concrete
  17. >cases of this, so the point is moot. I suspect the answer would be "yes",
  18. >though.
  19.  
  20. This should be OK to do.  The worst that will happen is that you will not
  21. have #pragma statements for some of the system routines if they were
  22. added after our last release of the headers.  Since system header files
  23. are backwards compatible, you shouldn't have any problems other than
  24. that.
  25.  
  26. >Are .fd files something I need? I remember workbench 1.3 had them and
  27. >NDK3.1 has lots. I don't currently have any idea what they're for.
  28.  
  29. You can use the .fd files to generate #pragma statements for shared
  30. libraries by using the FD2PRAGMA utility provided with SAS/C.  Check
  31. the Library Reference Manual for details.
  32.  
  33. >Yes. I've tried reading it and had no idea what was going on. I imagine I
  34. >will eventually realise GSTs are dead useful, but I suppose I'll come to
  35. >that later. 
  36.  
  37. Basically, when you create a GST the compiler parses the .h files and adds
  38. the symbols to its symbol table.  It then dumps the contents of the symbol
  39. table to disk.  When you want to use the GST, it is loaded from disk.  Not
  40. only is this much faster than recompiling all those headers, it can 
  41. remain in memory between compiles once it's created.  Using a GST can cut
  42. compile time by a minute or more PER C SOURCE FILE, depending on how many
  43. include files you use and how fast your machine is.
  44.  
  45. Try it yourself: create a file that just does a #include of <intuition.h>,
  46. which is huge by itself and also includes a lot of other files.  Compile 
  47. with NOGST (the default) and time it.  Then do it again but specify
  48. GST=<the system provided GST file>.  Compile time will drop to a couple of
  49. seconds.  If you immediately repeat the same compile, compile time is 
  50. virtually zero because the GST is still loaded from the last time.
  51.  
  52. If you just use the system provided GST file, you will get the speedup for
  53. system include files only.  If you create your own GST file for each project,
  54. you can get the speedup for your own header files and for your MUI and
  55. other add-on headers as well, but each time you change one of your .h files
  56. you'll need to rebuild the GST.  It's a tradeoff.
  57.  
  58. -- 
  59.   *****     
  60.  *|_o_o|\\     Doug Walker   walker@unx.sas.com  
  61.  *|. o.| ||                
  62.   | o  |//     Any opinions are mine, not those of SAS Institute, Inc.
  63.   ====== 
  64.